package io;

import java.io.*;

/**
 * Created by Administrator on 2017/12/21.
 */
public class FileInputTest {

    public static void main(String[] args) throws IOException {
    File inFile = new File("D:/input.txt");
    File outFile = new File("D:/out.txt");
    if(!inFile.exists()){
        inFile.createNewFile();
    }
    InputStream inputStream = new FileInputStream(inFile);
        OutputStream outputStream = new FileOutputStream(outFile);
    byte[] buff =new  byte[1024];
    int len=0;
    while((len = inputStream.read(buff))!=-1){
        outputStream.write(buff,0,len);
    }
    }


}
